<?php

/**
* 
*/
class LoginController extends Controller
{
    
    public function index()
    {


        // $data = Db::table('stu')->findAll();

        // include VIEW_PATH.'/index.html';
        // 调用模型
        $data = (new UserModel())->getTop();
        // 分配变量
        $this->assign('data',$data);
        $this->assign('title',"学并思");
        $this->assign('url',"http://www.baidu.com");
        //引视图
        $this->display();
    }

    public function code()
    {
        // 生成验证码
        (new Code())->entry();
    }

    public function logincheck()
    {
        echo "登录验证";

        $this->display('xbs');

        // include VIEW_PATH.'/index.html';
    }
}
